<%--
  Created by IntelliJ IDEA.
  User: 15154
  Date: 2020/10/10
  Time: 15:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>用户管理</title>
    <link rel="stylesheet" href="${pageContext.servletContext.contextPath}/resources/layui/css/layui.css">

</head>
<body>
<form action="/acceptSure/1" method="get">
<img style="width: 200px;height: 50px;" src="${pageContext.servletContext.contextPath}/resources/images/img.png">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>我的信息</legend>
</fieldset>
<div class="layui-form">
    <table class="layui-table">
        <colgroup>
            <col width="150">
            <col width="150">
            <col width="200">
            <col>
        </colgroup>
        <thead>
        <tr>
            <th>用户信息如下</th>
            <th></th>
        </tr>
        </thead>
        <c:forEach items="${list}" var="list">

        <tbody id="body">
            <tr>
                <td>任务名</td>
                <td>${list.taskname}</td>
            </tr>
            <tr>
                <td>任务内容</td>
                <td>${list.taskcontext}</td>
            </tr>
            <tr>
                <td>发布时间</td>
                <td>${list.addtime}</td>
            </tr>
            <tr>
                <td>积分</td>
                <td>${list.reward}</td>
            </tr>

            <tr>
                <td>发布人姓名</td>
                <td>${list.student.stuName}</td>
            </tr>

            <tr>
                <td>发布人电话</td>
                <td>${list.student.tel}</td>
            </tr>
            <tr>
                <td>发布人楼栋号</td>
                <td>${list.student.buildNumber}</td>
            </tr>

            <tr>
                <td>
                    <input type="hidden" name="state" value="1">
                    <input type="hidden" name="acceptStuId" value="${sessionScope.stuId}">
                    <input type="hidden" name="taskId" value="${taskId}">
                </td>
                <td>
                    <c:if test="${list.student.stuId!=sessionScope.stuId}">
                        <input type="submit" value="确认接收,接收后不可取消" class="layui-btn layui-btn-normal layui-btn-radius">
                    </c:if>
                    <c:if test="${list.student.stuId==sessionScope.stuId}">
                        <button type="button" class="layui-btn layui-btn-disabled">本人发布</button>
                    </c:if>
                </td>
            </tr>

        </tbody>
        </c:forEach>
    </table>
</div>

</form>
<script src="${pageContext.servletContext.contextPath}/resources/layui/layui.js"></script>
<script type="text/javascript">
    layui.use([ 'jquery', 'layer', 'form', 'table','laydate' ], function() {
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        var table = layui.table;
        var laydate=layui.laydate;

        //绑定时间选择器
        laydate.render({
            elem:'#startTime'
        });
        laydate.render({
            elem:'#endTime'
        });


    });
</script>
</body>
</html>
